import 'package:flutter/material.dart';
class Cart with ChangeNotifier{
  bool _isEdit=false;//管理状态
  setEdit(bool value){//设置管理状态
    _isEdit=value;
    notifyListeners();
  }

  bool get isEdit=>_isEdit;



  bool _isAll=true;//是否全选
  setAllSelect(bool value){
    _isAll=value;
    notifyListeners();
  }
  bool get isAll=>_isAll;


  List _selectCart=[];
  clearSelectCart(){
    _selectCart=[];
    notifyListeners();
  }
  setSelectCart(val){
    _selectCart=val;
    notifyListeners();
  }
  addSelectCart(String value){
    _selectCart.add(value);
    notifyListeners();
  }
  removeSelectCart(String value){
    _selectCart.remove(value);
    notifyListeners();
  }
  List get selectCart=>_selectCart;


}